Merged
Conversation
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 관련 이슈번호
close : #150
🔍 구현한 내용
808줄의 DeviceSearchPage.tsx를 관심사 분리 원칙에 따라 리팩토링하여 261줄로 축소했습니다.
기능과 디자인은 100% 동일하게 유지하며, 유지보수성과 재사용성을 크게 개선했습니다.
🔄 Changes
src/hooks/useDeviceSearch.ts (신규)
src/hooks/useScrollState.ts (신규)
src/hooks/useAddToCombination.ts (신규)
📁 File Structure (변경내용)
src/
├── constants/
│ └── deviceMapping.ts 매핑 함수
├── utils/
│ └── mapSearchDevice.ts 타입 변환
├── hooks/
│ ├── useDeviceSearch.ts 검색/필터 로직
│ ├── useScrollState.ts 스크롤 감지
│ └── useAddToCombination.ts 조합 담기 플로우
├── components/DeviceSearch/ (추가)
│ ├── DeviceDetailModal.tsx
│ ├── CombinationSelectModal.tsx
│ ├── CombinationDetailModal.tsx
│ └── SaveCompleteModal.tsx
└── pages/devices/
└── DeviceSearchPage.tsx [REFACTORED] 808 → 261줄
📢 리뷰어에게
검색/필터
모달
조합 담기 플로우